class BaseModel {
    constructor(data, message){
        this.message = message 
        this.data = data
    }
}

class SuccessModel extends BaseModel {
    constructor(data, message = '成功') {
        super(data, message)
        this.errno = 0
    }
}

class ErrorModel extends BaseModel {
    constructor(data, message = '失败') {
        super(data, message)
        this.errno = -1
    }
}

module.exports = {
    SuccessModel,
    ErrorModel
}